//
//  DUMeVC.m
//  language
//
//  Created by duyujin1 on 2021/8/1.
//

#import "DUMeVC.h"
#import "DULanguageVC.h"

@interface DUMeVC ()

@end

@implementation DUMeVC

-(instancetype)init{
    if(self=[super init]){
        NSString * title=NSLocalizedString(@"me", nil);
        self.tabBarItem.title=title;
        self.tabBarItem.image=[UIImage imageNamed:@"icon.bundle/home@2x.png"];
        self.tabBarItem.selectedImage=[UIImage imageNamed:@"icon.bundle/home_selected@2x.png"];
    }
    return self;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    UILabel *label = [UILabel new];
    label.text = NSLocalizedString(@"label", nil);
    label.font = [UIFont systemFontOfSize:20];
    [label sizeToFit];
    label.center = self.view.center;
    [self.view addSubview:label];
    
    [self addBtn];
}

- (void)addBtn {
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeSystem];
    btn.frame = CGRectMake(0, 0, 100, 100);
    btn.center = CGPointMake(self.view.center.x, 200);
    btn.backgroundColor = [UIColor redColor];
    [btn setTitle:NSLocalizedString(@"button", nil) forState:UIControlStateNormal];
    [self.view addSubview:btn];
    [btn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
}
- (void)btnClick:(UIButton *)sender {
    DULanguageVC *vc = [DULanguageVC new];
    vc.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:vc animated:YES];
}

@end
